package com.share.order.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.share.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 订单账单表实体类
 *
 * @author yourName
 * @date 2025-10-21
 */
@Data
@Schema(description = "订单账单表")
@TableName("order_bill") // 指定数据库表名（若类名与表名一致可省略）
public class OrderBill extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Schema(description = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 订单ID */
    @Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @TableField("order_id")
    private Long orderId;

    /** 账单项明细 */
    @Schema(description = "账单项明细", example = "0.00")
    @TableField("bill_item")
    private String billItem;

    /** 账单金额 */
    @Schema(description = "账单金额", example = "0.00")
    @TableField("bill_amount")
    private BigDecimal billAmount;

    /** 删除标志（0代表存在 2代表删除） */
    @Schema(description = "删除标志（0代表存在 2代表删除）", example = "0")
    @TableField("del_flag")
    @TableLogic // 逻辑删除注解
    private String delFlag;

    /** 备注 */
    @Schema(description = "备注")
    @TableField("remark")
    private String remark;
}